class Login():
    #登录接口
    url="http://8.137.19.140:9090/user/login"
    #请求方法
    method="POST"

    sucess_schema = {
        "type": "object",
        "properties": {
            "code": {
                "type": "string",
                "enum": ["SUCCESS"]
            },
            "errMsg": {
                "type": "string"
            },
            "data": {
                "type": "string",
                "description": "JWT token string"
            }
        },
        "required": ["code", "errMsg", "data"],
        "additionalProperties": False
    }

    fail_schema = {
        "type": "object",
        "properties": {
            "code": {
                "type": "string",
                "enum": ["FAIL"]
            },
            "errMsg": {
                "type": "string",
                "enum": ["用户不存在", "密码错误", "账号或密码不能为空"]
            },
            "data": {
                "type": "null"
            }
        },
        "required": ["code", "errMsg", "data"],
        "additionalProperties": False
    }

    #登录成功参数
    def login_success(self):
        return [
            {
                "username":"zhangsan",
                "password":"123456"
            },
            {
                "username": "lisi",
                "password": "123456"
            }
        ]

    #登录失败参数
    def login_fail(self):
        return[
            {
                "username":"zhang",
                "password":"123456"
            },
            {
                "username": "zhangsan",
                "password": "12345"
            },
            {
                "username": "li",
                "password": "123456"
            },
            {
                "username": "lisi",
                "password": "1234"
            },
            {
                "username": "",
                "password": "123456"
            },
            {
                "username": "lisi",
                "password": ""
            },
            {
                "username": "lisiaaakososjcishcudsvoashcusaycuhasuicaysiuchasucgyiastciuasgcyas",
                "password": ""
            },
            {
                "username": "",
                "password": "18641687684516xsccscascvadvgdfvdsgdvsbsdbkpoiazhfuvsydivnuxdovsd"
            }
        ]


Login_paramenter=Login()